The db client library fetches name service data out of an ddddbbbb((((3333BBBB)))) format
database file on the local host. This library is meant to be used only
by the nnnnssssdddd((((1111MMMM)))) daemon to efficiently access local name service data.
The library ////vvvvaaaarrrr////nnnnssss////lllliiiibbbb////lllliiiibbbbnnnnssss____ddddbbbb....ssssoooo is opened by the nnnnssssdddd((((1111MMMM)))) daemon when
ddddbbbb is listed as the protocol for some map in a nnnnsssssssswwwwiiiittttcccchhhh....ccccoooonnnnffff file.
The library contains code to fetch data from a local db file and present
it as lines from the configuration file from which it came. The nsd
daemon then presents that data in the filesystem mounted under /ns.
Extended attributes in the nnnnsssssssswwwwiiiittttcccchhhh....ccccoooonnnnffff file can be used to control the
behavior of the db library. Extended attributes are simply lists of
key/value pairs attached to each object in the nsd filesystem. The
attributes supported in this library are:
ddddoooommmmaaaaiiiinnnn
This is the domainname given as a parameter to the remote name
server. This attribute is typically inherited from the daemon
depending on the nsswitch.conf file that is being read. Given the
configuration file ////vvvvaaaarrrr////nnnnssss////ddddoooommmmaaaaiiiinnnnssss////DDDDOOOOMMMMAAAAIIIINNNNNNNNAAAAMMMMEEEE////nnnnsssssssswwwwiiiittttcccchhhh....ccccoooonnnnffff the
attribute "domain" is set to DOMAINNAME. This attribute controls
which file is used to supply the requested information. Given a
domain DOMAINNAME the library would open the file
////vvvvaaaarrrr////nnnnssss////ddddoooommmmaaaaiiiinnnnssss////DDDDOOOOMMMMAAAAIIIINNNNNNNNAAAAMMMMEEEE////ttttaaaabbbblllleeee....ddddbbbb. If the domain attribute is
unset then the file ////eeeettttcccc////ttttaaaabbbblllleeee....ddddbbbb would be used. See the
information about the ttttaaaabbbblllleeee attribute below. A client system can be
a member of multiple domains by including multiple instances of the
ddddbbbb keyword in the nsswitch.conf file like:
hosts: db(domain=engr) db(domain=corp)
ttttaaaabbbblllleeee
The ttttaaaabbbblllleeee attribute is typically inherited from the daemon based on
the line from which this entry occurs in the nsswitch.conf file. In
the above example the ttttaaaabbbblllleeee attribute would be set to hhhhoooossssttttssss....bbbbyyyynnnnaaaammmmeeee
or hhhhoooossssttttssss....bbbbyyyyaaaaddddddddrrrr depending on the context of the request. This
attribute is used as the file name containing the db data, with a
".db" appended. For the hhhhoooossssttttssss....bbbbyyyynnnnaaaammmmeeee map in the default domain the
file ////eeeettttcccc////hhhhoooossssttttssss....bbbbyyyynnnnaaaammmmeeee....ddddbbbb would be opened and searched.
kkkkeeeeyyyy The kkkkeeeeyyyy attribute is used to fetch the data from the db(3B) file.
It is set by the nsd(1M) daemon, and is used without alteration.
PPPPaaaaggggeeee 1111
DDDDBBBB((((7777PPPP)))) DDDDBBBB((((7777PPPP))))
ffffiiiilllleeee The ffffiiiilllleeee attribute overrides the domain and table attributes to set
the name of the file to be opened. If the file begins with a
leading '/' then that file is simply opened. If not, then the
contents of this attribute are appended to the directory name --
either ////eeeettttcccc//// for the default domain, or ////vvvvaaaarrrr////nnnnssss////ddddoooommmmaaaaiiiinnnnssss////DDDDOOOOMMMMAAAAIIIINNNNNNNNAAAAMMMMEEEE////
when the domain attribute is set.
ddddbbbb____hhhhaaaasssshhhh
The ddddbbbb____hhhhaaaasssshhhh attribute sets the hash type for a Berkeley db file.
The default is "btree". The valid choices are btree, hash, and